#ifndef STOCKINFO_H
#define STOCKINFO_H

#include <QByteArray>
#include <QString>
#include <QLabel>
#include <QTableWidgetItem>

class StockInfo
{
public:
    //StockInfo(QByteArray &ba);
    StockInfo(QString stockId);
    ~StockInfo();
    QString getStockId() {return stockId_;}
    QString getStockName();
    QString getCurrentPrice();
    QString getPercentage();
    QString getDiff();
    QString getVolume();

    void refreshData(QByteArray &array);
    void addColor();

    QTableWidgetItem* getTWIStockName();
    QTableWidgetItem* getTWIStockId();
    QTableWidgetItem* getTWICurrentPrice();
    QTableWidgetItem* getTWIPercentage();
    QTableWidgetItem* getTWIDiff();
    QTableWidgetItem* getTWIHighestLowest();
    QTableWidgetItem* getTWIVolume();
private:
    QString stockId_;
    QString stockName_;
    QString currentPrice_;
    QString percentage_;
    QString diff_;
    QString highest_;
    QString lowest_;
    QString volume_; //成交额
    QString allString_;

    bool up_;
    bool isStopTrad;

    QTableWidgetItem *twiStockName_;
    QTableWidgetItem *twiStockId_;
    QTableWidgetItem *twiCurrentPrice_;
    QTableWidgetItem *twiDiff_;
    QTableWidgetItem *twiPercentage_;
    QTableWidgetItem *twiHighestLowest_;
    QTableWidgetItem *twiVolume_;
};

#endif // STOCKINFO_H
